home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Gekkan Dennou Club 147
/
Gekkan Dennou Club - 2000.8 Vol. 147 (Japan).7z
/
Gekkan Dennou Club - 2000.8 Vol. 147 (Japan) (Track 1).bin
/
tools
/
ivl
/
src
/
hufilec.h
< prev
next >
Wrap
Text File
|
2000-06-17
|
3KB
|
66 lines
#if !defined(HUFILEC_H_HAS_INCLUDED)
#define HUFILEC_H_HAS_INCLUDED
/*
* ファイル取り扱い関数群(for Human68k)
*
* from Dec. 3,1993 by dummy.x.(with J-S.I.)
*/
#include <time.h>
/* 関数宣言 */
/* ファイル名 */
extern int is_human_name(const char *fnamp);
extern void get_prog_name(char *bufp, const char *pnamp);
extern char *remake_unsame_filename(char *fnbufp);
extern int get_drive_no(const char *drvnamp);
extern int make_full_path(char *fullp, const char *fnamp);
extern void separate_file_name(char *drvp, char *dirp, char *basep, char *extp, const char *fnamp);
extern char *fgetnamep(const char *fnamp);
/* パス名 */
extern char path_separator(void);
extern int is_path_separator(int ch);
extern char *append_path_separator(char *dirnamp);
extern char *fcatpath(char *fnamp, const char *pathp);
extern char *fcutpath(char *pbufp, const char *fnamp);
extern int is_there_path(const char *fnamp);
extern int is_path_only(const char *fnamp);
/* 拡張子 */
extern char *getextpos(const char *fnamp);
extern char *getextpos0(const char *fnamp);
extern char *fcatext(char *fnamp, const char *extp);
extern char *fcatext_upper(char *fnamp, const char *extp);
extern char *fcatext_lower(char *fnamp, const char *extp);
extern char *fchgext(char *fnamp, const char *extp);
extern char *fchgext_upper(char *fnamp, const char *extp);
extern char *fchgext_lower(char *fnamp, const char *extp);
/* ファイル/ドライブ情報の取得/設定 */
extern long get_drive_free(int drvno);
extern int fexist(const char *fnamp, int atr);
extern int is_same_file(const char *fn1p, const char *fn2p);
extern long get_file_size(const char *fnamp);
extern int set_file_time(const char *fnamp, time_t tim);
extern time_t get_file_time(const char *fnamp);
extern int set_same_file_time(const char *dstfnp, const char *srcfnp);
/* ファイルアクセス */
extern void *read_file_all(const char *fnamp, unsigned long *fsizp);
extern char *fgetsb(char *bufp, size_t size, FILE *fp);
extern char *fgetsnn(char *bufp, size_t size, FILE *fp);
extern char *fgets_skipsp(char *bufp, size_t size, FILE *fp);
/* 環境変数絡み */
extern char *get_env_path(char *bufp, const char *envnamp);
extern char *cut_from_pathseq(char *dstp, const char **envpp);
/* 関数偽装マクロ
* NO_MACRO_ が定義されなければ、一部の関数をマクロ呼び出しにしてしまう
*/
#if !defined(NO_MACRO_)
#include <string.h>
#define is_path_separator(ch) (((ch) == '\\') || ((ch) == ':') || ((ch) == '/'))
#define is_there_path(fnp) (strpbrk((fnp), "\\/:") != NULL)
#endif /* !defined(NO_MACRO_) */
#endif /* !defined(HUFILEC_H_HAS_INCLUDED) */